package com.lute.utils;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class DAOFactory {
	
	private static DAOFactory daoFactory = new DAOFactory();
	private static ApplicationContext context = 
			new FileSystemXmlApplicationContext("d:/Infa/PracaDyplomowa/Lute/src/main/webapp/WEB-INF/spring/lute-context.xml");
	
	private DAOFactory() {}
	
	public static DAOFactory getInstance() {
		return daoFactory;
	}
	
	public LuteInterfaceDAO getLuteInterface() { 
		LuteInterfaceDAO dao = (LuteInterfaceDAO)context.getBean("luteDao");
		return dao;
	}
}
